package com.bit.demo.demo1;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Calcu")
public class Calculator {
    @RequestMapping("/sum")
    public String sum(Integer num1, Integer num2 ) {
        return "<h1> 计算结果: " + (num1 + num2) + "</h1>";
    }

    @RequestMapping("/sum1")
    public String sum1() {
        return "<h1> 计算结果: " + 666 + "</h1>";
    }
}
